home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / bash / bash_110 / unixmode / src_d3.zoo / patches.zoo / lib / readline / Makefile.cross < prev   
Encoding:
Makefile  |  1991-10-30  |  2.6 KB  |  90 lines

  1. ## -*- text -*- ####################################################
  2. #                                   #
  3. # Makefile for readline and history libraries.               #
  4. #                                   #
  5. ####################################################################
  6.  
  7. # Here is a rule for making .o files from .c files that doesn't force
  8. # the type of the machine (like -sun3) into the flags.
  9. .c.o:
  10.     $(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) $(CPPFLAGS) $*.c
  11.  
  12. # Define TYPES as -DVOID_SIGHANDLER if your operating system uses
  13. # a return type of "void" for signal handlers.
  14. TYPES = -DVOID_SIGHANDLER
  15.  
  16. # Define USG as -DUSG if you are using a System V operating system.
  17. #USG = -DUSG
  18.  
  19. # HP-UX compilation requires the BSD library.
  20. #LOCAL_LIBS = -lBSD
  21.  
  22. # Xenix compilation requires -ldir -lx
  23. #LOCAL_LIBS = -ldir -lx
  24.  
  25. # Comment out "-DVI_MODE" if you don't think that anyone will ever desire
  26. # the vi line editing mode and features.
  27. READLINE_DEFINES = $(TYPES) # -DVI_MODE
  28.  
  29. DEBUG_FLAGS = 
  30. LDFLAGS = $(DEBUG_FLAGS) -s 
  31. CFLAGS  = $(DEBUG_FLAGS) $(USG) -I. -O -fstrength-reduce -fomit-frame-pointer
  32.  
  33. # A good alternative is gcc -traditional.
  34. CC = cgcc 
  35.  
  36. RANLIB = car s
  37. AR = car
  38. RM = rm
  39.  
  40. LOCAL_INCLUDES = -I../
  41.  
  42. CSOURCES = readline.c history.c funmap.c keymaps.c vi_mode.c \
  43.        emacs_keymap.c vi_keymap.c 
  44.  
  45. HSOURCES = readline.h chardefs.h history.h keymaps.h
  46. SOURCES  = $(CSOURCES) $(HSOURCES)
  47.  
  48.  
  49. ##########################################################################
  50.  
  51. all: readline.olb glob.olb
  52.  
  53. glob.olb:
  54.     (cd ../glob ;\
  55.          make -f Makefile.cross CC="$(CC)" CFLAGS="$(CFLAGS)" RANLIB="$(RANLIB)" )
  56.  
  57. readline.olb:    readline.o history.o funmap.o keymaps.o
  58.     $(RM) -f readline.olb
  59.     $(AR) cls readline.olb readline.o history.o funmap.o keymaps.o
  60.  
  61. readline.o:    readline.c readline.h chardefs.h  keymaps.h history.h vi_mode.c
  62.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  63.       $(LOCAL_INCLUDES) $*.c
  64.  
  65. history.o:    history.c history.h
  66.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  67.       $(LOCAL_INCLUDES) $*.c
  68.  
  69. funmap.o:    funmap.c readline.h
  70.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  71.       $(LOCAL_INCLUDES) $*.c
  72.  
  73. keymaps.o:    keymaps.c emacs_keymap.c vi_keymap.c keymaps.h chardefs.h
  74.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(READLINE_DEFINES) \
  75.       $(LOCAL_INCLUDES) $*.c
  76.  
  77. # The rule for 'includes' is written funny so that the if statement
  78. # always returns TRUE unless there really was an error installing the
  79. # include files.
  80. includes:
  81.     if [ -r $(INCDIR)/readline ]; then \
  82.       :; \
  83.     else \
  84.       mkdir $(INCDIR)/readline && chmod a+r $(INCDIR)/readline; \
  85.     fi
  86.     $(CP) readline.h keymaps.h chardefs.h $(INCDIR)/readline/
  87. clean:
  88.     rm -f *.o *.a
  89.     (cd doc; make clean)
  90.